#include "customizedbutton.h"
#include <QString>

CustomizedButton::CustomizedButton(QWidget *parent) :
    QPushButton(parent)
{

}

CustomizedButton::CustomizedButton(const QString &buttontitle, QWidget *parent) : QPushButton(parent), pathPrefix("./")
{
    this->title = QString(buttontitle);
    //TODO:
    QString imgFile =  pathPrefix + title + "-normal.png";
    QIcon icon(imgFile);
    setIcon(icon);
    setStyleSheet("{background-image:" + imgFile + ";}");
    setFocusPolicy(Qt::NoFocus);

}


